package com.waitingsnow.core.mvc
{
import flash.utils.Dictionary;

/**
 * 
 * @author waitingsnow
 * $Id: Facade.as 2 2012-05-17 10:10:03Z cgslendy@gmail.com $
 */
public class Facade
{
	//==========================================================================
	//  Constructor
	//==========================================================================
	/**
	 * Constructs a new <code>Application</code> instance.
	 * 
	 */
	public function Facade()
	{
		
	}
	
	//==========================================================================
	//  Variables
	//==========================================================================
	protected var contentDict:Dictionary;
	protected var app:Object;
	
	//==========================================================================
	//  Methods
	//==========================================================================
	public function startup(app:Object):void
	{
		this.app = app;
		initModel();
		initView();
		initController();
	}
	
	protected function initModel():void
	{
		
	}
	
	protected function initView():void
	{
		
	}
	
	protected function initController():void
	{
		
	}
	
	protected function addContent(ins:Object, name:String):void
	{
		if (!contentDict)
		{
			contentDict = new Dictionary();
		}
		contentDict[name] = ins;
	}
	
	public function getContent(name:String):Object
	{
		return contentDict && contentDict[name];
	}
}
}